<% link_to edit_network_path, :class => 'ui-state-default ui-corner-all dialog_link' do %>
		<span class="ui-icon ui-icon-pencil"></span>Edit
	<% end %>&nbsp;
	<% link_to @network, :confirm => 'Are you sure ?', :method => :delete, :class => "ui-state-error ui-corner-all dialog_link ui-state-hover" do %>
		<span class="ui-icon ui-icon-close"></span>Destroy
	<% end %>&nbsp;
	<% link_to networks_path, :class => 'ui-state-default ui-corner-all dialog_link' do %>
		<span class="ui-icon ui-icon-arrowreturnthick-1-w"></span>Back
	<% end %></br></br>
<p>
  <b>Name:</b>
  <%=h @network.name %>
</p>

<p>
  <b>Gateway:</b>
  <% if @network.computer != nil %><%=h @network.computer.name %><%end%>
</p>

<p>
  <b>Submask:</b>
  <%=h @network.submask %>
</p>
<p>
  <h2>Rooms :</h2>
  		<% Room.all.each do |room| %>
			<%if @network.rooms.include?(room)%>
	      	  <ul><%= link_to room.code, room %></ul>
			<%end%>
		<%end%>	 
</p> 
<p>
  <h2>Computers:</h2>
  <table>
	  <tr class="ui-state-default">
	    <th>Name</th>
	    <th>Network</th>
	    <th>Ip address</th>
	    <th>Status</th>
	  </tr>
  	  <% @network.computers.each do |computer| %>
	      <tr>
		    <td><%=link_to computer.name, computer %></td>
		    <td><% if computer.network != nil %><%=h computer.network.name %><%end%></td>
		    <td><%=h computer.ip_address %></td>
		    <td><%=h Computer::COMPUTER_STATUS[computer.status] %></td>
		  </tr>
	  <%end%>
  </table>
</p>

<BR />
	<% link_to edit_network_path, :class => 'ui-state-default ui-corner-all dialog_link' do %>
		<span class="ui-icon ui-icon-pencil"></span>Edit
	<% end %>&nbsp;
	<% link_to @network, :confirm => 'Are you sure ?', :method => :delete, :class => "ui-state-error ui-corner-all dialog_link ui-state-hover" do %>
		<span class="ui-icon ui-icon-close"></span>Destroy
	<% end %>&nbsp;
	<% link_to networks_path, :class => 'ui-state-default ui-corner-all dialog_link' do %>
		<span class="ui-icon ui-icon-arrowreturnthick-1-w"></span>Back
	<% end %>